package com.ihelin.insurance.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpSession;

/**
 * @author iHelin
 * @since 2021/2/28 15:04
 */
@Controller
public class SalesPageController {

    @GetMapping("/sales/register")
    public String register() {
        return "sales/register";
    }

    @GetMapping("/sales/login")
    public String login() {
        return "sales/login";
    }

    @GetMapping("/sales/logout")
    public String logout(HttpSession session) {
        session.removeAttribute("salesUser");
        return "redirect:/index";
    }

    @GetMapping("/sales/index")
    public String index() {
        return "sales/index";
    }

    @GetMapping("/sales/learning")
    public String learning() {
        return "sales/learning";
    }

    @GetMapping("/sales/answer")
    public String answer() {
        return "sales/answer";
    }

    @GetMapping("/sales/feedback")
    public String feedback() {
        return "sales/feedback";
    }
}
